package com.zyh.alpacaDemo.orderAdaper;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.ZonedDateTime;

/**
 * @Classname OrderResponse
 * @Description TODO()
 * @Date 2025-09-01 21:04
 * @Created by 86177
 */
public class AdapterOrderResponse {
    private String id;

    @com.fasterxml.jackson.annotation.JsonProperty("client_order_id")
    private String clientOrderId;

    @com.fasterxml.jackson.annotation.JsonProperty("created_at")
    private ZonedDateTime createdAt;

    @com.fasterxml.jackson.annotation.JsonProperty("updated_at")
    private ZonedDateTime updatedAt;

    private String symbol;
    private String side;
    private String type;

    @com.fasterxml.jackson.annotation.JsonProperty("time_in_force")
    private String timeInForce;

    private String qty;
    private String notional;

    @com.fasterxml.jackson.annotation.JsonProperty("limit_price")
    private Double limitPrice;

    private String status;

    @com.fasterxml.jackson.annotation.JsonProperty("filled_qty")
    private Double filledQty;

    @com.fasterxml.jackson.annotation.JsonProperty("filled_avg_price")
    private Double filledAvgPrice;

    public AdapterOrderResponse(String id, String clientOrderId, ZonedDateTime createdAt, ZonedDateTime updatedAt, String symbol, String side, String type, String timeInForce, String qty, String notional, Double limitPrice, String status, Double filledQty, Double filledAvgPrice) {
        this.id = id;
        this.clientOrderId = clientOrderId;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.symbol = symbol;
        this.side = side;
        this.type = type;
        this.timeInForce = timeInForce;
        this.qty = qty;
        this.notional = notional;
        this.limitPrice = limitPrice;
        this.status = status;
        this.filledQty = filledQty;
        this.filledAvgPrice = filledAvgPrice;
    }

    public AdapterOrderResponse() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getClientOrderId() {
        return clientOrderId;
    }

    public void setClientOrderId(String clientOrderId) {
        this.clientOrderId = clientOrderId;
    }

    public ZonedDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(ZonedDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public ZonedDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(ZonedDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public String getSide() {
        return side;
    }

    public void setSide(String side) {
        this.side = side;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTimeInForce() {
        return timeInForce;
    }

    public void setTimeInForce(String timeInForce) {
        this.timeInForce = timeInForce;
    }

    public String getQty() {
        return qty;
    }

    public void setQty(String qty) {
        this.qty = qty;
    }

    public String getNotional() {
        return notional;
    }

    public void setNotional(String notional) {
        this.notional = notional;
    }

    public Double getLimitPrice() {
        return limitPrice;
    }

    public void setLimitPrice(Double limitPrice) {
        this.limitPrice = limitPrice;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Double getFilledQty() {
        return filledQty;
    }

    public void setFilledQty(Double filledQty) {
        this.filledQty = filledQty;
    }

    public Double getFilledAvgPrice() {
        return filledAvgPrice;
    }

    public void setFilledAvgPrice(Double filledAvgPrice) {
        this.filledAvgPrice = filledAvgPrice;
    }

    @Override
    public String toString() {
        return "Order ID: " + id + "\n" +
                "Status: " + status + "\n" +
                "Symbol: " + symbol + "\n" +
                "Side: " + side + "\n" +
                "Quantity: " + qty + "\n" +
                "Filled: " + filledQty + "\n" +
                "Average Price: " + filledAvgPrice;
    }
}
